php forum
php mysql forum
php mysql smarty
 
Page 1 of 3 1 2 3 >
Topic Options
#200016 - 05/13/03 10:54 AM [6.x] ubb_portal.pl - A Poor Man's UBB Portal
Mike Bobbitt Offline
Member

Registered: 04/30/01
Posts: 230
Loc: Ottawa, ON, Canada
Modification Name: ubb_portal.pl - A Poor Man's UBB Portal

Author(s): Mike Bobbitt

Description: ubb_portal.pl is designed to work with a UBB content island. It reads through the posts listed in an HTML content island (styled or unstyled work OK), and generates a "news" page that can be included in a portal. As the content island is automatically updated by UBB, so is the news page.

Demo: http://Army.ca/main.php

Requirements: UBB 6.x, using Content Islands, access to crontab or scheduled tasks

Download Link: http://Perl.Bobbitt.ca/ubb_portal

Notes: No UBB modifications required. This script runs standalone, reading the content islands created by UBB and generating a "news" page that can be included in your portal.

Works with both recent topic and recent post CIs and can be configured to truncate long posts (with ...). Properly updates Graemlin links to work, and won't truncate in the middle of an HTML tag. A sample style sheet is included, to get things going.

In the demo link above, the centre colum ("Army.ca News") is the sample output.
_________________________
Mike Bobbitt
PERL Stuff

Top
#200017 - 05/13/03 01:39 PM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
tackaberry Offline

Pooh-Bah

Registered: 11/28/00
Posts: 3234
Loc: NYC | 100% Hockey
Wow Mike....outstanding work!

laugh
_________________________

Top
#200018 - 05/13/03 01:52 PM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Very cool (too bad I can't add scheduled tasks)! I think tho you should explain which CSS tags are used and where...
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#200019 - 05/13/03 02:14 PM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
Mike Bobbitt Offline
Member

Registered: 04/30/01
Posts: 230
Loc: Ottawa, ON, Canada
Thanks guys!

Good point LK.

EDIT: I've included a ubb_portal.css file in the zip.

You can change any of that through the code if you want (just search for each class name), but it's probably easier to just define the classes as you want to see them.

Cheers
_________________________
Mike Bobbitt
PERL Stuff

Top
#200020 - 05/13/03 04:48 PM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Great work Mike laugh
_________________________
- Allen wavey
- What Drives You?

Top
#200021 - 05/14/03 11:24 PM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
This is a new ubbnews-like script using CI? smile
_________________________
- Allen wavey
- What Drives You?

Top
#200022 - 05/14/03 11:29 PM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Might wanna consider either closing the

with a or changing to

and changing <hr> to <hr /> smile
_________________________
- Allen wavey
- What Drives You?

Top
#200023 - 05/18/03 06:29 PM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
Arianna Offline
Junior Member

Registered: 07/16/00
Posts: 11
I'm having a few problems with installing the portal.
(Somewhat off subject: I have a small teddy on the top of my monitor. A friend tells me whenever I have a coding problem, to talk to the teddy FIRST before I scream for help. It's good advice and has saved alot of friendships, however, I've talked to my teddy for the last hour or so....and I'm still stumped on this one)

First off:
[an error occurred while processing this directive]
I'm getting this message after I've followed the instructions with all except one.

The one I haven't been able to figure out:
4. Enable ubb_portal.pl to be run as a cron job (*nix) or scheduled task (Windows). Sample crontab entry to run ubb_portal.pl every 15 minutes is:
00,15,30,45 * * * * /home/user/www/cgi-bin/ubb_portal.pl
(prays I don't need root access to the server or unix to do this.....) Could you dumb down your response to me? Give me a link to where I need to read up on this?

Also....I want to be sure on the paths....
my $ubbdir="/home/bobbitt/www/army/ubb";
my $ubbpath="http://Army.ca/ubb";
my $cifile="$ubbdir/ContentIslands/7/html.html";
my $outputfile="/home/bobbitt/www/army/includes/news.php";

I have:
my $ubbdir="/home/arianna/ubb/noncgi";
my $ubbpath="http://dimhorizon.com/ubb/noncgi/icons";
my $cifile="$ubbdir/ContentIslands/9/html.html";
my $outputfile="/home/arianna/ubb/noncgi/includes/news.php";

OTHER QUESTIONS:
*****
Do I chmod ubb_portal.php to 755 or 777? (Chmoded to 755 at the moment) I've tried both with no change...
Do I add a news.php blank file to the includes folder and chmod 755 or 777? (Chmoded to 755 at the moment) Or will ubb portal create the file?

I've checked and double checked my paths....
still getting the error...HELP!

Thanks for all that help.
Regards,
Arianna
_________________________

.........before coffee!

My UBB forum smile
http://www.dimhorizon.com/cgi-bin/ultimatebb.cgi

Top
#200024 - 05/18/03 06:36 PM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
Arianna Offline
Junior Member

Registered: 07/16/00
Posts: 11
ok...looks like my paths are ok. I've managed to get rid of
[an error occurred while processing this directive]

*talks once more to the teddy on her monitor*
betcha it's something exceptionally stupid that I'm forgetting!
_________________________

.........before coffee!

My UBB forum smile
http://www.dimhorizon.com/cgi-bin/ultimatebb.cgi

Top
#200025 - 05/18/03 06:38 PM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
This:
my $ubbpath="http://dimhorizon.com/ubb/noncgi/icons";

looks a little suspect, are you sure you want the /icons on the end?

I'm not a cron expert tho.. but it'll work at least once when everything (not including the cron task) is setup correctly smile 755 is fine on the permissions and the news.php file is created automagically once you set it up. smile
_________________________
- Allen wavey
- What Drives You?

Top
#200026 - 05/18/03 06:42 PM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
Arianna Offline
Junior Member

Registered: 07/16/00
Posts: 11
Everything should be ok now, except this....

Enable ubb_portal.pl to be run as a cron job (*nix) or scheduled task (Windows). Sample crontab entry to run ubb_portal.pl every 15 minutes is:
00,15,30,45 * * * * /home/arianna/cgi-bin/ubb_portal.pl
_________________________

.........before coffee!

My UBB forum smile
http://www.dimhorizon.com/cgi-bin/ultimatebb.cgi

Top
#200027 - 05/18/03 06:44 PM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
Arianna Offline
Junior Member

Registered: 07/16/00
Posts: 11
Allen,
What the heck is CRON? *grins*
_________________________

.........before coffee!

My UBB forum smile
http://www.dimhorizon.com/cgi-bin/ultimatebb.cgi

Top
#200028 - 05/18/03 07:41 PM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
Arianna Offline
Junior Member

Registered: 07/16/00
Posts: 11
Gotta love Google...
I've found out what Cron is...and also scheduled tasks... bummer. Was hoping this would be a little less a hassle to use. Gonna continue my research and see if I can get it to work.

BTW...it's still not working even without the Cron task. So something in either my paths or chmoding is foobar'd. :-/
_________________________

.........before coffee!

My UBB forum smile
http://www.dimhorizon.com/cgi-bin/ultimatebb.cgi

Top
#200029 - 05/18/03 09:19 PM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
You'll most likely need to get your server admin to set it up for you, unless you have some sort of control panel that allows you to set up a cron job smile
_________________________
- Allen wavey
- What Drives You?

Top
#200030 - 05/19/03 06:56 AM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
messagedj Offline
Member

Registered: 01/23/02
Posts: 84
Loc: Amsterdam
mike... you keep on amazing me...

it seems like the only thing you do is scripting! lol

i am still fine tuning your Album.pl, but now we have this again...

why do you keep on giving me that work...


but i love it!

thnx!
_________________________
FOUNDER & WEBMASTER OF DJWEBPAGES


Dj Webpages
UBB addicted

Top
#200031 - 05/19/03 09:34 PM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
PrimeTime Offline
Member

Registered: 11/06/01
Posts: 1046
Cool job Mike. thumbsup
_________________________
Members Spotlight Winner
bac-Clan
--------------------

Top
#200032 - 05/20/03 10:40 AM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
Mike Bobbitt Offline
Member

Registered: 04/30/01
Posts: 230
Loc: Ottawa, ON, Canada
Hi Guys. Go away for a weekend and you miss a lot! smile

Thanks for the HTML corrections Allen, I've updated the script with them. Good thing someone's keeping an eye on me. wink

Arianna, looks like you've figured out most of what's going on. What results (if any) do you get when you run ubb_portal.pl now? Is there a news.php file created? Does it have anything in it? There is a debug statement you can turn on ("$::debug=0;" changes to "$::debug=4;") but that may not help much.

messagedj, thanks! I actually do have a life -- well, sort of... I put this script together in an evening, so it didn't take too much time. Seems that's starting to show a bit... wink

Cheers
_________________________
Mike Bobbitt
PERL Stuff

Top
#200033 - 05/20/03 10:51 AM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
Mike Bobbitt Offline
Member

Registered: 04/30/01
Posts: 230
Loc: Ottawa, ON, Canada
Hey, just noticed UBBDev is running ubb_portal.pl on the main page. Thanks!

Guess I need to make it look prettier now. wink Plus, it says 0 replies, but there are 6. Is that a script bug or is it just slow to update?
_________________________
Mike Bobbitt
PERL Stuff

Top
#200034 - 05/20/03 12:04 PM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
Mike Bobbitt Offline
Member

Registered: 04/30/01
Posts: 230
Loc: Ottawa, ON, Canada
Quick note: I've added ubb_portal.css to the zip file, which has all the style classes pre-defined. I've also added some additional classes such as a header and footer block.
_________________________
Mike Bobbitt
PERL Stuff

Top
#200035 - 05/20/03 03:59 PM Re: [6.x] ubb_portal.pl - A Poor Man's UBB Portal
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Thanks for the updates Mike smile

Quote:
quote:
Originally posted by Mike Bobbitt:
Hey, just noticed UBBDev is running ubb_portal.pl on the main page. Thanks!

Guess I need to make it look prettier now. wink Plus, it says 0 replies, but there are 6. Is that a script bug or is it just slow to update?
We don't have a cron job setup to update it.. not sure how yet without bugging an already over-worked navaho tipsy
_________________________
- Allen wavey
- What Drives You?

Top
Page 1 of 3 1 2 3 >



Moderator:  Charles, Gizmo 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks